import processing.opengl.*;

void setup() 
{
  size(1280, 720, OPENGL);
  stroke(#036564, 255);
  strokeWeight(8);
  smooth();
  fill(#CDB380, 192);
  background(#E8DDCB);
  noLoop();
}

int sz = 200;     // size
int sol[][][] = {
{
{0, 0, 0}, {1, 0, 0}, {2, 0, 0},
{2, 0, 1}, {1, 0, 1}, {1, 1, 1},
{1, 2, 1}, {1, 2, 2}, {1, 1, 2},
{1, 0, 2}, {2, 0, 2}, {2, 1, 2},
{2, 1, 1}, {2, 1, 0}, {1, 1, 0},
{0, 1, 0}, {0, 1, 1}, {0, 0, 1},
{0, 0, 2}, {0, 1, 2}, {0, 2, 2},
{0, 2, 1}, {0, 2, 0}, {1, 2, 0},
{2, 2, 0}, {2, 2, 1}, {2, 2, 2}
},
{
{0, 0, 0}, {1, 0, 0}, {2, 0, 0},
{2, 1, 0}, {1, 1, 0}, {1, 1, 1},
{1, 1, 2}, {1, 2, 2}, {1, 2, 1},
{1, 2, 0}, {2, 2, 0}, {2, 2, 1},
{2, 1, 1}, {2, 0, 1}, {1, 0, 1},
{0, 0, 1}, {0, 1, 1}, {0, 1, 0},
{0, 2, 0}, {0, 2, 1}, {0, 2, 2},
{0, 1, 2}, {0, 0, 2}, {1, 0, 2},
{2, 0, 2}, {2, 1, 2}, {2, 2, 2}
}
};

void draw() {

//  rotateX(-PI/8.0);
//  rotateY(PI/8.0);
  translate(115,100,0);

  beginShape();
  for( int i=0; i<27; i++ ) {
    vertex(sol[0][i][0]*sz, sol[0][i][1]*sz, -sol[0][i][2]*sz);
  }
  endShape();

  translate(width/2,0,0);

  beginShape();
  for( int i=0; i<27; i++ ) {
    vertex(sol[1][i][0]*sz, sol[1][i][1]*sz, -sol[1][i][2]*sz);
  }
  endShape();

  save("cube_line.png");
}
